//
//  TrackPolyline.h
//  2bulu-NewAssistant
//
//  Created by Kent Peifeng Ke on 3/19/15.
//  llf modified
//  Copyright (c) 2015 È≠èÊñ∞Êù∞. All rights reserved.
//

//#warning exist use new
#import <MapBasics/LAPolyline.h>

@interface TrackPolyline : LAPolyline<LAOverLayExt>

@property (nonatomic, copy) id  trackIdentifier;//轨迹线对应的轨迹 ID
//@property (nonatomic, copy) NSManagedObjectID * trackIdentifier;//轨迹线对应的轨迹 ID

//@property (nonatomic) MKCoordinateRegion region;//轨迹在地图上所占的区域
//是否标记起终点,如若已经添加到地图，需要调-refreshPolyLine才可让设置生效
@property (nonatomic,copy) NSString *startPointMarkText;//标记起点字符
@property (nonatomic,copy) NSString *endPointMarkText;//标记终点字符
#if TARGET_OS_IPHONE
@property (nonatomic,copy) UIFont *markFont;//default is system font 12
#else
@property (nonatomic,copy) NSFont *markFont;//default is system font 12
#endif
@property (nonatomic) BOOL reverse;

//设置polyLine的默认宽度
+(void)setDefaultPolylineStrokeWidth:(CGFloat)w;

@end

// llf 2016.12.24 created
#pragma mark-
//除坐标外，还可以代表增加第二个轨迹点对应参数的轨迹，比如每一个轨迹点可以对应一个海拔，或者速度
@interface ValueAddedTrackPolyLine : TrackPolyline

/*
 *设定轨迹点对应value值，这个value可以代表速度，海拔等信息，视具体使用场景设定
 */
+ (instancetype)polylineWithPoints:(const MKMapPoint *)points
                      PointsValues:(const float *)values
                             count:(NSUInteger)count;

+ (instancetype)polylineWithCoordinates:(const CLLocationCoordinate2D *)coords
                           PointsValues:(const float *)values
                                  count:(NSUInteger)count;

//设定最小、中间、最大三个颜色色值 需要调用-refreshPolyLine才能让设定值生效
#if TARGET_OS_IPHONE
@property (nonnull,nonatomic,copy) UIColor *minColor;
@property (nonnull,nonatomic,copy) UIColor *midColor;
@property (nonnull,nonatomic,copy) UIColor *maxColor;
#else
@property (nonnull,nonatomic,copy) NSColor *minColor;
@property (nonnull,nonatomic,copy) NSColor *midColor;
@property (nonnull,nonatomic,copy) NSColor *maxColor;
#endif

//设定最小参考值、中间参考值、最大参考值，如果不设定的话\
最小参考值就是pointsValues的最小值，中间参考值就是pointsValues的平均值，最大参考值就是pointsValues的最大值\
需要调用-refreshPolyLine才能让设定值生效
@property (nonatomic) float minRefValue;
@property (nonatomic) float midRefValue;
@property (nonatomic) float maxRefValue;


@property (nullable, nonatomic, readonly) float *pointsValues;//value 数组指针首地址



@end
